import { $$post, $post, $get, $$get } from '@/utils/requestLes';

// 盘点计划查询
export function getStocktakingPage(data: any) {
  return $post('/stocktaking/queryPageList', data);
}
// 盘点计划保存
export function getStocktakingSave(data: any) {
  return $post('/stocktaking/saveOrUpdate', data);
}
// 盘点计划删除
export function getStocktakingDelete(data: any) {
  return $get('/stocktaking/deleteStocktakingPlan', data);
}
// 盘点指定区域数据源
export function getDesignatedArea() {
  return $$post('/msSslShelves/selectMsSslShelves');
}

// 盘点明细查询
export function getStocktakingDetail(data: any) {
  return $post('/stocktakingDetail/queryDetailPageList', data);
}

// 查询大件库位
export function getLargeStorageLocation(data: any) {
  return $get('/carLocation/queryByType', data);
}

// 盘点计划选择大件库位查询物料
export function getMaterialsByLane(data: any) {
  return $get('/mdsitem/selectMdsItem', data);
}

// 盘点作业查询盘点单号
export function getStocktaKingCode() {
  return $$get('/stocktaking/queryStocktakingWork');
}

// 通过盘点计划查询盘点物料及托盘
export function getMaterialsByPlan(data: any) {
  return $get('/stocktakingDetail/queryDetailWork', data);
}

// 通过物料编码查询物料信息
export function getMaterials(data: any) {
  return $get('/stocktakingDetail/queryDetailMaterialCode', data);
}

// 提交盘点
export function saveMaterials(data: any) {
  return $post('/stocktakingDetail/saveOrUpdateDetail', data);
}

// 获取机型
export function getMachineType() {
  return $$get('/stocktaking/selectByProduct');
}

// 盘点 托盘回库
export function inTrays(data: any) {
  return $post('msWorkbinMaterial/lesDebuggingDoTask', data);
}
